﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site2.Master" Inherits="System.Web.Mvc.ViewPage<DTO.Models.USER>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Them nguoi dung
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <% Html.EnableClientValidation(); %> 
    <% using (Html.BeginForm("AddUpdateUser", "User", FormMethod.Post, new { id = "frmMedia", enctype = "multipart/form-data" }))
       {%>
        <div class="dung-section frm-insert">
		    <div class="dung-section-title">Thêm mới người dùng</div>
		    <div class="dung-section-content">
            <%= Html.ValidationSummary() %>
			    <div>
				    <p>
                        <%= Html.HiddenFor(model => model.ID) %>
				    </p>

                    <p>
					    <label><b><%= Html.Label("Tên đăng nhập")%></b></label>
					    <br/>
                        <%= Html.TextBoxFor(model => model.UserName, new { @class = "dung-textbox", size = "30", maxlength = "30" })%>
				    </p>
				    <p>
					    <label><b><%= Html.Label("Mật khẩu")%></b></label>
					    <br/>
                        <%= Html.PasswordFor(model => model.Password, new { @class = "dung-textbox",  size = "30", maxlength = "30" })%>
				    </p>
                    <p>
					    <label><b><%= Html.Label("Tên người dùng")%></b></label>
					    <br/>
                        <%= Html.TextBoxFor(model => model.FullName, new { @class = "dung-textbox", size = "50", maxlength = "50" })%>
				    </p>
                    <p>
                        <label><b><%= Html.Label("Loại người dùng")%></b></label>
                        <br/>
                        <%= Html.DropDownListFor(model=>model.Type, (SelectList)ViewData["ListUserType"]) %>
                    </p>
                    <p>
                        <label><b><%= Html.Label("Trạng thái")%></b></label>
                        <br/>
                        <%= Html.CheckBox("IsActive", Model.IsActive)%>
                    </p>
                    <p>
                        <input type="submit" name="submit" class="dung-button" value="Lưu lại" />
                        <input type="button" name="" class="dung-button" value="Bỏ qua" onclick="boqua()" />
                    </p>
			    </div>
		    </div>
	    </div>

    <% } %>
    <script type="text/javascript">
        function boqua() {
            window.location = "/User";
        }
    </script>
</asp:Content>
